﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Unity;
using ExplorerInfrastructure;
using LayoutWindow.Views;
using Microsoft.Practices.Prism.Regions;

namespace LayoutWindow.ModuleDefinition
{
    public class LayoutModule:IModule
    {
        IUnityContainer container;
        public LayoutModule(IUnityContainer container)
        {
            this.container = container;
        }
        public void Initialize()
        {
            LayoutView view=new LayoutView() { DataContext = null };
            container.RegisterInstance<IView>("LayoutView", view);
            IRegionManager regionManager = container.Resolve<IRegionManager>();
            regionManager.RegisterViewWithRegion("LayoutRegion", () => { return view; });
        }
    }
}
